Memory Management

#include stdlib.h>

void &sstarf#star;calloc(size_t no, size_t sz); Allocate and initialize memory for no items of size size.

void &sstarf#star;malloc(size_t sz); Allocate sz bytes of memory.

void &sstarf#star;realloc(void &sstarf#star;ptr, size_t sz); Resize memory pointed to by ptr to size sz.

void free(void &sstarf#star;ptr); Free memory obtained by calloc, malloc or realloc.

void &sstarf#star;alloca(size_t sz); Allocate sz bytes from the current function stack.

void _malloczero(int bool); Zero allocated memory blocks. Default = = false.

void _mallocChunkSize(size_t Siz); Get memory from OS in atleast Siz sized blocks. Default = = 4K


#include memory.h>

void &sstarf#star;_calloc(unsigned long no, unsigned long sz); void &sstarf#star;_malloc(unsigned long sz); void &sstarf#star;_realloc(void &sstarf#star;ptr, unsigned long sz); Apart from the above functions, these three functions are additionally declared in memory.h and take long arguments.